package com.lzhsite.technology.designPattern.decorate.CoffeeDemo;

public class ClientForCoffeeDemo
{
    public static void main(String[] args)
    {
        Coffee coffee = new Coffee("拿铁", 55.0);
        Decorator sugar = new Sugar();
        Decorator milk = new Milk();

        sugar.setComponent(coffee);
        milk.setComponent(sugar);

        milk.showCoffee();

        System.out.println(milk.showPrice());
    }
}
